﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ClassLibrary.Configuration.Switch;

namespace ClassLibrary.Agent
{
    [Serializable]
    public class Query
    {
        public QueryType QueryType { get; set; }
        public ConfSwitchingTable.Record Record { get; set; }

        public override string ToString()
        {
            var stringBuilder = new StringBuilder();

            stringBuilder.AppendLine("[QueryType]");
            stringBuilder.AppendLine(QueryType.ToString());
            if (Record != null)
            {
                stringBuilder.AppendLine("[Record]");
                stringBuilder.AppendLine(Record.ToString());
            }

            return stringBuilder.ToString();
        }
    }
}
